import java.util.Scanner;
import java.util.HashSet;
import java.util.Set;
import java.util.LinkedHashSet;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class OldKeyboard {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            //检查类型改为Line

            String should = in.nextLine();
            String actual = in.nextLine();

            Set<Character> actualcode = new HashSet<>();
            for (char i : actual.toUpperCase().toCharArray()) {
                actualcode.add(i);
            }

            LinkedHashSet<Character> brokencode = new LinkedHashSet<>();
            for (char i : should.toUpperCase().toCharArray()) {
                if (!actualcode.contains(i)) {
                    brokencode.add(i);
                }
            }

            StringBuilder result = new StringBuilder();
            for (char i : brokencode) {
                result.append(i);
            }

            System.out.println(result);
        }
    }
}